<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Test extends CI_Controller
{
	function __construct()
	{
		parent::__construct();
	}

	function index()
	{	
		$this->load->view('test/code', '');
	}
	
	function flow_player(){
		$this->load->view('test/flow_player', '');
	}
	
	function test_connect(){
		$db_server = "219.84.203.116";
	    //資料庫名稱
	    $db_name = "adsense_user";
	    //資料庫管理者帳號
	    $db_user = "adsensec";
	    // 資料庫管理者密碼
	    $db_passwd = "C7cde58$";
	        
	    //對資料庫連線
	    if (!@mysql_connect($db_server, $db_user, $db_passwd))
	        die("無法對資料庫連線connect error");
	        
	    //資料庫連線採UTF8
	    //mysql_query("SET NAMES utf8");
	        
	    //選擇資料庫
	    if (!@mysql_select_db($db_name))
	        die("無法使用資料庫select db error");
		
		$query = 'select * from user_agent limit 2';
		echo $query;
		$result = mysql_query($query);
		echo "<pre>";print_r($result);echo "</pre>";
	}
}